﻿@model IEnumerable<KuaJing.Portal.Cms.Domain.Category>

@Html.ActionLink("添加", "Edit")

<br />
@using (Html.BeginForm())
{
    @Html.Query()
    @Html.Submit("查询")
}


@*@Html.Query().FilterFor(m => m.Name).FilterFor(m => m.Parent).FilterFor(m => m.CreatedTime, FilterBinary.Range).OrderDescendingFor(m => m.Name)*@
<br />
@*@Html.Table(() => Html.ActionLink("hello", "Index"), m => m.Id, m => m.Name)*@

@Html.Table(() => Html.ActionLink("hello", "Index")).Build(properties =>
{
    properties.Add(m => m.Name).RenderAs(v => "hello" + v);
//    properties.Extend("操作", v => Html.ActionLink(v.Name, "Index"), v => Html.ActionLink("删除", "Delete"));
})


@*@Html.Table(Model).Build(columns =>
{
    columns.Add(m => m.Id).Titled("序号");
    columns.Add(m => m.Name);
    columns.Add(m => m.Parent).RenderedAs(m => m.Parent == null ? string.Empty : m.Parent.Name);
    columns.Add(m => m.Children.Count()).Titled("子类型数量");
    columns.Add(m => m.Id).Titled("操作").Encoded(false).RenderedAs(model => Html.ActionLink("编辑", "Edit", new { id = model.Id }));
})*@

